import Data from "../object/Data"

export default class CanvasData extends Data {
  x: number
  y: number
  width: number
  height: number
  constructor(width = 0, height = 0) {
    super()
    this.name = "canvas"
    this.x = 0
    this.y = 0
    this.width = width
    this.height = height
  }
  get aspectRatio() {
    const e = this.width / this.height
    return isFinite(e) ? e : 1
  }
}
